// A set of useful vertex shader function all-in-one

void fvGetTangentVectors(vec3 normal, out vec3 tangent, out vec3 binormal)
{
   vec3 up = normalize( normal + vec3(0, 1, 0) );
   vec3 right = normalize( cross( normal, up ) );
   binormal = normalize( cross( right, normal ) );
   tangent = normalize( cross( normal, binormal ) );
}
